﻿using System.Web.Script.Services;
using System.Web.Services;
using Gammar.Price.Business;
using Gammar.Price.ObjectModel;
using System;

/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class WebService : System.Web.Services.WebService
{

    public WebService()
    {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [GenerateScriptType(typeof(ItemEntity))]
    [WebMethod()]
    [ScriptMethod(UseHttpGet = true)]
    public DataBlock<ItemEntity> RetrieveEntityList(int pageIndex, int pageCount, string criteria)
    {
        try
        {
            return BusinessObjectLogic.RetrieveList(pageIndex, pageCount, criteria);
        }
        catch (Exception e)
        {
            throw e;
        }
    }
}

